<!--{template header}-->
<script type="text/javascript" src="{SITE_URL}js/jquery.js"></script>
<script type="text/javascript" src="{SITE_URL}js/calendar.js"></script>
<div class="content">
    <h1>手动添加/修改客户信息</h1>
    <form name="customerform" action="index.php?c=customer&a=edit" method="POST">
        <div class="hr_system_zhuo zhuo">
            <div class="biaodan2">
                <h9>受理信息：</h9>
                <ul><p>受理时间：</p><li>{$customer['processingdate']}</li></ul>
                <ul><p>受理区域： </p><li>{$area[$operator['areaid']]['name']}</li></ul>
                <ul><p>受理人员：</p><li>{$operator['username']}</li></ul>
                <ul>
                    <p>客户来源：</p>
                    <li>
                        <select name="sourcetype" id="sourcetype">
                            <option value="1" <!--{if $customer['sourcetype']==1}-->selected<!--{/if}-->>网站注册</option>
                            <option value="2" <!--{if $customer['sourcetype']==2}-->selected<!--{/if}-->>电话来访</option>
                            <option value="3" <!--{if $customer['sourcetype']==3}-->selected<!--{/if}-->>同行渠道</option>
                            <option value="4" <!--{if $customer['sourcetype']==4}-->selected<!--{/if}-->>上门来访</option>
                            <option value="5" <!--{if $customer['sourcetype']==5}-->selected<!--{/if}-->>杂志广告</option>
                        </select>
                    </li>
                </ul>
                <ul>
                    <p>当前客户状态： </p>
                    <li>
                        <select name="status" id="status">
                            <option value="0" <!--{if $customer['status']==0}-->selected<!--{/if}-->>未处理客户</option>
                            <option value="1" <!--{if $customer['status']==1}-->selected<!--{/if}-->>已咨询客户</option>
                            <option value="2" <!--{if $customer['status']==2}-->selected<!--{/if}-->>跟单提醒</option>
                            <option value="3" <!--{if $customer['status']==3}-->selected<!--{/if}-->>有意向客户</option>
                            <option value="4" <!--{if $customer['status']==4}-->selected<!--{/if}-->>储备客户</option>
                            <option value="5" <!--{if $customer['status']==5}-->selected<!--{/if}-->>签约客户</option>
                            <option value="6" <!--{if $customer['status']==6}-->selected<!--{/if}-->>出签客户</option>
                            <option value="9" <!--{if $customer['status']==9}-->selected<!--{/if}-->>跑单客户</option>
                        </select>
                    </li>
                </ul>
            </div>
            <div class="biaodan">
                <h9>业务属性：</h9>
                <ul>
                    <p>办理国家：</p>
                    <li>
                        <select name="state" id="state" onchange="get_selected_country();">
                            <!--{loop $statelist $state}-->
                            <option value="{$state['id']}" <!--{if $state['id']==$customer['state']}-->selected<!--{/if}-->><!--{$state['name']}--></option>
                            <!--{/loop}-->
                        </select>&nbsp;&nbsp;
                        <select name="country" id="country"></select>
                    </li>
                </ul>
                <ul>
                    <p>签证类型：</p>
                    <li>
                        <select name="passporttype" id="passporttype"><option value="1" <!--{if $customer['passporttype']==1}-->selected<!--{/if}-->>商务签证</option><option value="2" <!--{if $customer['passporttype']==2}-->selected<!--{/if}-->>旅游签证</option><option value="3" <!--{if $customer['passporttype']==3}-->selected<!--{/if}-->>探亲访友</option></select>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;邀请函：
                        <select name="inviteletter" id="inviteletter"><option value="0" <!--{if $customer['inviteletter']==0}-->selected<!--{/if}-->>否</option><option value="1" <!--{if $customer['inviteletter']==1}-->selected<!--{/if}-->>是</option></select>
                    </li>
                </ul>
                <ul><p>签证数量：</p><li><select name="peoplenum" id="peoplenum">
                            <!--{loop $peoplerandom $num}-->
                            <option value="{$num}" <!--{if $num==$customer['peoplenum']}-->selected<!--{/if}-->>$num</option>
                            <!--{/loop}-->
                        </select>&nbsp;人&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;是否加急：
                        <select name="urgent" id="urgent">
                            <option value="0" <!--{if $customer['urgent']==0}-->selected<!--{/if}-->>否</option>
                            <option value="1" <!--{if $customer['urgent']==1}-->selected<!--{/if}-->>是</option>
                        </select>&nbsp;&nbsp;&nbsp;/&nbsp;&nbsp;&nbsp;是否面试：
                        <select name="interview" id="interview">
                            <option value="0" <!--{if $customer['interview']==0}-->selected<!--{/if}-->>否</option>
                            <option value="1" <!--{if $customer['interview']==1}-->selected<!--{/if}-->>是</option>
                        </select>
                    </li>
                </ul>
            </div>

            <div class="biaodan">
                <h9>联系人信息：</h9>
                <ul>
                    <p>姓名：</p>
                    <li><input type="text" name="cusername" id="cusername" value="{$customer['username']}"/>&nbsp;&nbsp;性别：
                        <select name="cgender" id="cgender">
                            <option value="1" <!--{if $customer['cgender']==1}-->selected<!--{/if}-->>男</option>
                            <option value="0" <!--{if $customer['cgender']==0}-->selected<!--{/if}-->>女</option>
                        </select>
                    </li>
                </ul>
                <ul><p>手机号码：</p><li><input type="text" name="mobile" id="mobile" value="{$customer['mobile']}"/>&nbsp;&nbsp;电子邮箱：<input type="text" name="email" id="email" value="{$customer['email']}" /></li></ul>
                <ul><p>固定电话：</p><li><input name="phone" type="text" id="phone"  value="{$customer['phone']}"/></li></ul>
                <ul><p>联系地址：</p><li><input name="address" type="text" id="address" size="50" value="{$customer['address']}"/></li></ul>
                <ul><p>传真：</p><li><input type="text" name="fax" id="fax" value="{$customer['fax']}"/>&nbsp;&nbsp;邮编：<input type="text" name="postcode" id="postcode" value="{$customer['postcode']}"/></li></ul>
            </div>
            <div class="biaodan">
                <h9>申请人护照信息：</h9>
                <ul><p>姓名：</p><li><input type="text" name="pusername" id="pusername" value="{$passport['username']}" />&nbsp;&nbsp;性别：<select name="pgender" id="pgender">
                            <option value="1" <!--{if $passport['cgender']==1}-->selected<!--{/if}-->>男</option>
                            <option value="0" <!--{if $passport['cgender']==0}-->selected<!--{/if}-->>女</option>
                        </select></li>
                </ul>
                <ul><p>现居住地：</p><li><select name="homecity" id="homecity">
                            <!--{loop $citylist $city}-->
                            <option value="{$city['id']}" <!--{if $passport['homecity']==$city['id']}-->selected<!--{/if}-->>{$city['name']}</option>
                            <!--{/loop}-->
                        </select>&nbsp;&nbsp;出发日期：&nbsp;&nbsp;<input name="departuretime" type="text" id="departuretime" onclick="calendar.show(this);" size="10" maxlength="10" readonly="readonly" value="{$passport['departuretime']}"/></li></ul>
                <ul><p>护照签发地：</p><li><select name="passportcity" id="passportcity">
                            <!--{loop $citylist $city}-->
                            <option value="{$city['id']}" <!--{if $passport['passportcity']==$city['id']}-->selected<!--{/if}-->>{$city['name']}</option>
                            <!--{/loop}-->
                        </select></li></ul>
                <ul><p>护照号码：</p><li><input name="passportnum" type="text" id="passportnum" size="50" value="{$passport['passportnum']}" /></li></ul>
                <ul><p>护照有效期：</p><li><input name="passportstart" type="text" id="passportstart" onclick="calendar.show(this);" size="10" maxlength="10" readonly="readonly" value="{$passport['passportstart']}"/> - <input name="passportend" type="text" id="passportend" onclick="calendar.show(this);" size="10" maxlength="10" readonly="readonly" value="{$passport['passportend']}"/></li></ul>
                <ul><p>备注：</p><li><textarea name="pcomment" cols="50" rows="1" id="pcomment">{$passport['comment']}</textarea></li></ul>
            </div>

            <div class="biaodan">
                <h9>财务信息：</h9>
                <ul><p>市场报价：</p><li>￥{$payment['marketprice']}元  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;实际定价：<input name="price" type="text" id="price" size="10"  onblur="summoney()" value="{$payment['actualprice']}"/>&nbsp;元&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;订单收费总计：￥<span id="showmoney"></span>元</li></ul>
                <ul><p>支出签证成本：</p><li><input name="passportexpense" type="text" id="passportexpense" size="10" value="{$payment['passportexpense']}"/>&nbsp;元&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;支付对象：<select name="payobject" id="payobject">
                            <option value="1" <!--{if $payment['payobject']==1}-->selected<!--{/if}-->>领馆</option>
                            <option value="2" <!--{if $payment['payobject']==2}-->selected<!--{/if}-->>渠道</option>
                        </select></li></ul>
                <ul><p>支出保险成本：</p><li><input name="insuranceexpense" type="text" id="insuranceexpense" size="10"  value="{$payment['insuranceexpense']}"/>&nbsp;元</li></ul>
                <ul><p>发票税费：</p><li>需要发票：<select name="invoice" id="invoice">
                            <option value="0" <!--{if $payment['invoice']==0}-->selected<!--{/if}-->>否</option>
                            <option value="1" <!--{if $payment['invoice']==1}-->selected<!--{/if}-->>是</option>
                        </select>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;金额：<input name="invoicemoney" type="text" id="invoicemoney" size="10" value="0"/>&nbsp;元</li></ul>
                <ul>
                    <p>实收已付款：</p>
                    <li><input name="money" type="text" id="money" size="10"  value="0"/>&nbsp;元&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;付款方式： <select name="paytype" id="paytype">
                            <option value="1">现金支付</option>
                            <option value="2">银行转账</option>
                            <option value="3">网站充值</option>
                            <option value="4">POS刷卡</option>
                        </select></li></ul>
                <ul><p>尾款：</p><li><input name="finalpay" type="text" id="finalpay" size="10" value="{$payment['finalpay']}"/>&nbsp;元&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<select name="finalpaystatus" id="finalpaystatus">
                            <option value="0" <!--{if $payment['finalpaystatus']==0}-->selected<!--{/if}-->>未付</option>
                            <option value="1" <!--{if $payment['finalpaystatus']==2}-->selected<!--{/if}-->>已付</option>
                        </select>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;确认人：<input name="confirmor" type="text" id="confirmor" size="10" value="{$payment['confirmor']}"/></li></ul>
                <ul><p>订单业绩：</p><li>￥<span id="grademoney">0</span>元</li></ul>
            </div>
            <div class="biaodan">
                <h9>订单受理结果：</h9>
                <ul><p>出签结果：</p><li><select name="signedstate" id="signedstate">
                            <option value="0" <!--{if $customer['signedstate']==0}-->selected<!--{/if}-->>未确定</option>              
                            <option value="1" <!--{if $customer['signedstate']==1}-->selected<!--{/if}-->>成功出签</option>
                            <option value="2" <!--{if $customer['signedstate']==2}-->selected<!--{/if}-->>签证未通过</option>
                        </select></li></ul>
                <ul><p>出签日期：</p><li>{$passport['departuretime']}</li></ul>
            </div>
            <div class="biaodan tijiao">
                <ul>
                    <input type="submit" name="submit" id="button" value="提交" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                    <input type="submit" name="button2" id="button2" value="取消" /></ul>
            </div>

        </div>
        <input type="hidden" name="cid" value="{$cid}" />
    </form>
    <!-- end .content --></div>
<!-- end .container --></div>
<script type="text/javascript">
    function get_selected_country(){
        var pid = $("#state").val();
        $.post("{SITE_URL}index.php?c=area&a=ajaxcountry", {pid:pid},
        function(options){
            $("#country").html(options);
        });
    }
    function summoney(){
        var totalmoney = $("#peoplenum").val()*$("#price").val();
        $("#showmoney").html(totalmoney);
        $("#grademoney").html(totalmoney);
    }
    $(document).ready(function(){
        get_selected_country();
    });
</script>
</body>
</html>
